/*
 Navicat Premium Data Transfer

 Source Server         : local
 Source Server Type    : MySQL
 Source Server Version : 50721
 Source Host           : localhost:3306
 Source Schema         : sxhyd

 Target Server Type    : MySQL
 Target Server Version : 50721
 File Encoding         : 65001

 Date: 26/01/2022 08:40:09
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for tbl_admin
-- ----------------------------
DROP TABLE IF EXISTS `tbl_admin`;
CREATE TABLE `tbl_admin` (
  `id` int(32) NOT NULL AUTO_INCREMENT,
  `username` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '用户名',
  `pwd` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '密码',
  `status` int(2) DEFAULT '0' COMMENT '0正常1禁用',
  `role_id` int(12) DEFAULT NULL COMMENT '路由ID',
  `manage_area` int(12) DEFAULT NULL COMMENT '管理区域',
  `nickname` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '昵称',
  `deleted` int(6) DEFAULT '0' COMMENT '逻辑删除',
  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uni_username` (`username`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=100001 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Records of tbl_admin
-- ----------------------------
BEGIN;
INSERT INTO `tbl_admin` VALUES (100000, 'admin', '101193D7181CC88340AE5B2B17BBA8A1', 0, 1, NULL, '管理员', 0, '2021-04-14 17:20:39', '2021-06-29 13:19:03');
COMMIT;

-- ----------------------------
-- Table structure for tbl_contact
-- ----------------------------
DROP TABLE IF EXISTS `tbl_contact`;
CREATE TABLE `tbl_contact` (
  `id` int(32) NOT NULL AUTO_INCREMENT,
  `openid` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '属于哪个用户的联系人',
  `name` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '名字',
  `certificate_type` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '证件类型',
  `idcard` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '证件号码',
  `phone` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '手机号',
  `deleted` int(2) NOT NULL DEFAULT '0',
  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Records of tbl_contact
-- ----------------------------
BEGIN;
INSERT INTO `tbl_contact` VALUES (2, 'oYppO6WUPTlGdj2VtnllGLsguRCM', '王呜呜', '身份证', '340000000000000242', '15000000222', 0, '2021-09-15 16:55:42', '2021-09-17 09:39:07');
INSERT INTO `tbl_contact` VALUES (3, 'oYppO6WUPTlGdj2VtnllGLsguRCM', '阿萨德', '身份证', '310115198006233833', '23424', 1, '2021-09-16 16:54:58', '2021-09-16 18:06:58');
INSERT INTO `tbl_contact` VALUES (4, 'oYppO6WUPTlGdj2VtnllGLsguRCM', '张三', '身份证', '411424198711181634', '18857223333', 0, '2021-09-17 09:34:25', '2021-09-17 09:34:25');
COMMIT;

-- ----------------------------
-- Table structure for tbl_menu
-- ----------------------------
DROP TABLE IF EXISTS `tbl_menu`;
CREATE TABLE `tbl_menu` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) DEFAULT NULL,
  `parent_id` int(11) DEFAULT '0',
  `sequence` int(11) DEFAULT '0',
  `url` varchar(255) DEFAULT NULL,
  `icon` varchar(64) DEFAULT NULL,
  `deleted` int(2) DEFAULT '0',
  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=35 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of tbl_menu
-- ----------------------------
BEGIN;
INSERT INTO `tbl_menu` VALUES (10, '系统设置', 0, 0, NULL, NULL, 0, '2021-08-05 16:05:03', '2021-08-05 16:05:03');
INSERT INTO `tbl_menu` VALUES (13, '修改密码', 10, 0, 'user_pwd', NULL, 0, '2021-08-05 16:07:25', '2021-08-05 16:08:11');
INSERT INTO `tbl_menu` VALUES (32, '预定信息', 0, 10000, NULL, NULL, 0, '2021-08-13 14:51:26', '2021-09-14 09:54:52');
INSERT INTO `tbl_menu` VALUES (33, '预定列表', 32, 0, 'reservation_list', NULL, 0, '2021-08-13 14:52:00', '2021-09-14 10:05:41');
INSERT INTO `tbl_menu` VALUES (34, '预定设置', 32, 0, 'reservation_setting_list', NULL, 0, '2021-09-14 10:06:00', '2021-09-16 09:25:06');
COMMIT;

-- ----------------------------
-- Table structure for tbl_reserve
-- ----------------------------
DROP TABLE IF EXISTS `tbl_reserve`;
CREATE TABLE `tbl_reserve` (
  `id` int(32) NOT NULL AUTO_INCREMENT,
  `openid` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '预约用户的openid',
  `avatar` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '头像',
  `nickname` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '微信昵称',
  `reserve_time` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '预约时间',
  `remark` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '备注',
  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Records of tbl_reserve
-- ----------------------------
BEGIN;
INSERT INTO `tbl_reserve` VALUES (1, 'oYppO6WUPTlGdj2VtnllGLsguRCM', 'http://thirdwx.qlogo.cn/mmopen/3GQRFUV3icoyGzEnD0rR9MewWTNttOk1S1XurwkjwT03EOykckqOic9ySaMk60rtCQPokTBUaktSE4lBAxXal8TvmmicPMJcWd5/132', 't', '2021-09-16', '预约了2人', '2021-09-16 10:27:53', '2021-09-16 10:27:53');
INSERT INTO `tbl_reserve` VALUES (3, 'oYppO6WUPTlGdj2VtnllGLsguRCM', 'http://thirdwx.qlogo.cn/mmopen/3GQRFUV3icoyGzEnD0rR9MewWTNttOk1S1XurwkjwT03EOykckqOic9ySaMk60rtCQPokTBUaktSE4lBAxXal8TvmmicPMJcWd5/132', 't', '2021-09-17', '', '2021-09-16 16:09:29', '2021-09-16 16:09:29');
COMMIT;

-- ----------------------------
-- Table structure for tbl_reserve_item
-- ----------------------------
DROP TABLE IF EXISTS `tbl_reserve_item`;
CREATE TABLE `tbl_reserve_item` (
  `id` int(32) NOT NULL AUTO_INCREMENT,
  `reserve_id` int(32) NOT NULL COMMENT '预约信息id',
  `nickname` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '预约人微信昵称',
  `name` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '名字',
  `certificate_type` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '证件类型',
  `idcard` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '证件号码',
  `phone` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '手机号',
  `reserve_time` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '预约时间',
  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Records of tbl_reserve_item
-- ----------------------------
BEGIN;
INSERT INTO `tbl_reserve_item` VALUES (1, 1, 't', '任会勇1', '身份证', '430322197509241410', '15000000001', '2021-09-16', '2021-09-16 10:27:53', '2021-09-16 10:27:53');
INSERT INTO `tbl_reserve_item` VALUES (2, 1, 't', '任会勇2', '身份证', '340603199605174611', '15000000002', '2021-09-16', '2021-09-16 10:27:53', '2021-09-16 10:27:53');
INSERT INTO `tbl_reserve_item` VALUES (3, 3, 't', '小明', '身份证', '371482198106010352', '18549619616', '2021-09-17', '2021-09-16 16:09:29', '2021-09-16 16:09:29');
COMMIT;

-- ----------------------------
-- Table structure for tbl_reserve_setting
-- ----------------------------
DROP TABLE IF EXISTS `tbl_reserve_setting`;
CREATE TABLE `tbl_reserve_setting` (
  `id` int(32) NOT NULL AUTO_INCREMENT,
  `reserve_time` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '可预约日期',
  `reserve_number` int(32) NOT NULL COMMENT '可预约人数',
  `yet_reserve_number` int(32) NOT NULL DEFAULT '0' COMMENT '已预约人数',
  `deleted` int(2) NOT NULL DEFAULT '0' COMMENT '逻辑删除',
  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Records of tbl_reserve_setting
-- ----------------------------
BEGIN;
INSERT INTO `tbl_reserve_setting` VALUES (1, '2021-09-17', 3000, 2997, 0, '2021-09-16 09:31:04', '2021-09-16 16:18:46');
INSERT INTO `tbl_reserve_setting` VALUES (2, '2021-09-16', 3000, 2, 0, '2021-09-16 09:31:30', '2021-09-16 09:31:30');
INSERT INTO `tbl_reserve_setting` VALUES (3, '2021-09-15', 1, 0, 1, '2021-09-16 09:55:15', '2021-09-16 09:55:33');
INSERT INTO `tbl_reserve_setting` VALUES (4, '2021-09-15', 10000, 0, 0, '2021-09-16 09:56:36', '2021-09-16 10:09:47');
INSERT INTO `tbl_reserve_setting` VALUES (5, '2021-09-18', 20001, 0, 1, '2021-09-16 09:58:03', '2021-09-16 10:13:10');
INSERT INTO `tbl_reserve_setting` VALUES (6, '2021-09-18', 1000, 0, 0, '2021-09-16 10:13:19', '2021-09-16 10:13:19');
INSERT INTO `tbl_reserve_setting` VALUES (7, '2021-09-19', 2001, 0, 1, '2021-09-16 15:19:30', '2021-09-16 15:19:39');
COMMIT;

-- ----------------------------
-- Table structure for tbl_role
-- ----------------------------
DROP TABLE IF EXISTS `tbl_role`;
CREATE TABLE `tbl_role` (
  `id` int(32) NOT NULL AUTO_INCREMENT,
  `menu_power` varchar(255) DEFAULT NULL,
  `role_name` varchar(128) DEFAULT NULL,
  `deleted` int(2) DEFAULT '0',
  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of tbl_role
-- ----------------------------
BEGIN;
INSERT INTO `tbl_role` VALUES (1, '1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34', '总管理员', 0, '2021-04-15 14:36:42', '2021-09-14 10:06:21');
COMMIT;

-- ----------------------------
-- Table structure for tbl_users
-- ----------------------------
DROP TABLE IF EXISTS `tbl_users`;
CREATE TABLE `tbl_users` (
  `id` int(32) NOT NULL AUTO_INCREMENT,
  `avatar` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '头像',
  `openid` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'openid',
  `nickname` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '微信昵称',
  `gender` int(2) DEFAULT NULL COMMENT '性别',
  `city` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '城市',
  `phone` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '手机',
  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uni_openid` (`openid`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Records of tbl_users
-- ----------------------------
BEGIN;
INSERT INTO `tbl_users` VALUES (1, 'http://thirdwx.qlogo.cn/mmopen/3GQRFUV3icoyGzEnD0rR9MewWTNttOk1S1XurwkjwT03EOykckqOic9ySaMk60rtCQPokTBUaktSE4lBAxXal8TvmmicPMJcWd5/132', 'oYppO6WUPTlGdj2VtnllGLsguRCM', 't', 1, '', NULL, '2021-09-16 08:35:52', '2021-09-16 08:35:48');
INSERT INTO `tbl_users` VALUES (2, NULL, 'oYppO6azkbFSDD1rgK8gQOJ7dpOI', '丶开坦克的贝塔哥', 1, '淮北', NULL, '2021-09-15 17:07:03', '2021-09-15 17:07:02');
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
